const print = require('./print');
const config = require('./config');
const delay = require('./delay');
console.log(delay);

async function main() {
  const textLength = config.text.length;
  let curIndex = 0;
  while (curIndex < textLength) {
    print(curIndex);
    await delay(config.wordDurtion);
    curIndex++;
  }
}
main();
